Skip to content

fix: exclude rofd build-dep on mips64el and sw64 - #462

Merged
pengfeixx merged 1 commit into
linuxdeepin:masterfrom
pengfeixx:fix/rofd-arch-limit
Nov 26, 2026
Merged

pengfeixx merged 1 commit into
linuxdeepin:masterfrom
pengfeixx:fix/rofd-arch-limit

Conversation

@pengfeixx

@pengfeixx pengfeixx commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The mips64el and sw64 build environments (e.g. the snipe-2500u3 shuttle builder) carry no librofd-ffi-dev in their apt sources, so pbuilder-satisfydepends aborts during build-dependency resolution and the package never gets built:

pbuilder-satisfydepends-dummy : Depends: librofd-ffi-dev (>= 0.4.0) which is a virtual
  package and is not provided by any available package
E: pbuilder-satisfydepends failed.

This PR limits the rofd build dependency to architectures that actually ship the package.

Changes

  • debian/control: add arch qualifiers [!mips64el !sw64] to librofd-ffi-dev (>= 0.4.0)
  • Uses the canonical Debian architecture name sw64 (not the GNU name sw_64), consistent with the qualifier names used previously in this file

Impact

  • mips64el/sw64: CMake's rofd auto-detection finds no rofd.h / librofd_ffi.so, only logs a warning and resolves OFD_SUPPORT off. All OFD code paths are guarded by the OFD_SUPPORT_ENABLED compile definition, so the build completes cleanly; OFD format support is simply unavailable on those architectures.
  • Other architectures: unchanged — the build-dep stays, OFD support intact, and librofd-ffi0 remains a runtime dependency via ${shlibs:Depends}.

Testing

  • dpkg-checkbuilddeps parses the modified control file without syntax errors (validates the sw64 qualifier name against dpkg cputable)
  • Verified CMakeLists gracefully disables OFD when rofd is absent (find_path/find_library + API probe + compile definition guards)
  • mips64el deb build passes dependency resolution and produces a package
  • Install the mips64el package; PDF/DJVU/DOCX open normally, no crash
  • amd64/arm64 build: OFD files still open as before

PMS: TASK-398545

Summary by Sourcery

Exclude the rofd build dependency on architectures that do not ship it so package builds can complete without OFD support.

Bug Fixes:

  • Prevent builds on mips64el and sw64 from failing when the rofd development package is unavailable.

Enhancements:

  • Keep OFD support enabled on architectures that provide rofd while allowing it to be disabled gracefully elsewhere.

@sourcery-ai

sourcery-ai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Exclude the rofd build dependency on mips64el and sw64, where the development package is unavailable.

  • debian/control L21

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

1. mips64el/sw64 apt sources carry no librofd-ffi-dev, so
   pbuilder-satisfydepends aborts before the build even starts.
2. Add arch qualifiers [!mips64el !sw64] to the rofd build-dep;
   CMake auto-detects rofd and drops OFD support gracefully when
   the library is absent, so those arches still build fine.
3. Use the canonical Debian arch name "sw64", not the GNU name.

Influence:
1. Verify the mips64el deb build passes dependency resolution
   (no longer aborts on librofd-ffi-dev) and produces a package.
2. Verify the sw64 build likewise; install the built package and
   confirm PDF/DJVU/DOCX files still open normally.
3. On amd64/arm64, confirm OFD files still open (rofd build-dep
   unchanged) and librofd-ffi0 remains a runtime dependency.
4. On mips64el, confirm the UI hides OFD entries cleanly with no
   crash when opening a document.

fix: 排除 mips64el/sw64 架构的 rofd 构建依赖

1. mips64el/sw64 的 apt 源中没有 librofd-ffi-dev,依赖解析阶段
   即告失败,构建根本无法开始。
2. 为 rofd 构建依赖添加架构限定 [!mips64el !sw64];CMake 会自动
   探测 rofd,缺失时优雅关闭 OFD 支持,不影响这些架构正常构建。
3. 使用 Debian 规范架构名 "sw64",而非 GNU 名。

Influence:
1. 验证 mips64el 构建可通过依赖解析(不再因 librofd-ffi-dev 中断)
   并正常出包。
2. 验证 sw64 构建同理;安装产物后确认 PDF/DJVU/DOCX 文件可正常打开。
3. 在 amd64/arm64 上确认 OFD 文件仍可打开(rofd 构建依赖未变),
   运行时依赖仍包含 librofd-ffi0。
4. 在 mips64el 上确认界面干净地隐藏 OFD 相关入口,打开文档无崩溃。

Log: OFD document support is unavailable on mips64el and sw64
PMS: TASK-398545
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, pengfeixx

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pengfeixx
pengfeixx merged commit 6ae0e6b into linuxdeepin:master Nov 26, 2026
8 of 9 checks passed
@pengfeixx
pengfeixx deleted the fix/rofd-arch-limit branch November 26, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants